<template>
	<view class="one">
		<text class="titles">{{title}}</text>
		<view class="tips">
			<text style="color: red;" :hidden="isTop">置顶</text>
			<text>{{author}}</text>
			<text>{{comment}}</text>
			<view class="tips1">
				<text>{{time}}</text>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name: "cardText",
		props: {
			title: {
				type: String,
				default: "新闻标题",
				required: true,
			},
			isTop: {
				type: Boolean,
				default: false,
				required: true
			},
			author: {
				type: String,
				default: "来源",
				required: true
			},
			comment: {
				type: String,
				default: "0",
				required: true
			},
			time: {
				type: String,
				default: "2000.00.00"
			}
		},
		data() {
			return {
			}
		},
		methods: {

		}
	}
</script>

<style>
	.one{
		background-color: #fdfdfd;
		margin: 10rpx;
		border-bottom:1rpx solid #aaa;
		border-radius: 5rpx;
	}
	.titles {
		margin:10rpx;
		font-size: 18px;
	}
	.tips {
		margin: 5rpx;
		font-size: 12px;
		color: gray;
		display: flex;
		gap: 20rpx;
	}
	.tips1{
		flex: 1; 
		display: flex; 
		justify-content: flex-end;
	}
</style>